package gui2.g3;

import java.awt.Color;
import java.awt.Component;

import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;

public class ChatListRenderer implements ListCellRenderer {

	@Override
	public Component getListCellRendererComponent(JList list, Object value,
			int index, boolean isSelected, boolean cellHasFocus) {

		JLabel l = new JLabel();

		l.setText(value.toString());

		if (value.toString().contains("AFK")) {
			l.setForeground(Color.RED);
		}

		return l;
	}

}
